// router.tsx 或 App.tsx
import {Routes, Route} from "react-router-dom";
import MainLayout from "./layout/MainLayout";
import HomePage from "./page/HomePage";
import SelectedPage from "./page/SelectedPage";
import StarPage from "./page/StarPage";
import HistoryPage from "./page/HistoryPage";
import PrintPage from "./page/PrintPage";


function AppRoutes() {
    return (
        <Routes>
            <Route element={<MainLayout/>}>
                <Route path="/" element={<HomePage/>}/>
                <Route path="/selected" element={<SelectedPage/>}/>
                <Route path="/collection" element={<StarPage/>}/>
                <Route path="/history" element={<HistoryPage/>}/>
            </Route>
            {/* pdf渲染页面 */}
            <Route path="/print" element={<PrintPage/>}/>
        </Routes>
    );
}

export default AppRoutes;